FROM python:3.11

ENV PYTHONUNBUFFERED 1

RUN mkdir -p /code
COPY ./requirements.txt /code

WORKDIR /code

COPY ./sources.list /etc/apt/sources.list

RUN apt-get clean && apt-get -y update && \
    apt-get install python3-dev default-libmysqlclient-dev -y

RUN pip install pip -U && pip install -r requirements.txt

COPY . /code/